package com.example.demo.design.observe_pattern.two;

/**
 * @Author: liull
 * @Description:
 * @Date: Created in 9:48 2021/4/2
 * @Modified By:
 */
public class Client {
    public static void main(String[] args) {
        AllyControllerCenter acc = new ConcreteAllyControllerCenter("17");

        Observer player1, player2, player3, player4;

        player1 = new Player("17shou");
        acc.join(player1);
        player2 = new Player("17lighost");
        acc.join(player2);
        player3 = new Player("17baolei");
        acc.join(player3);
        player4 = new Player("17xiaobei");
        acc.join(player4);
        player1.beAttacked(acc);
    }
}
